<template>
  <div class="register">
    <h1>注册</h1>
    <AuthForm submitText="注册" :showEmail="true" @success="handleRegisterSuccess" />
    <p>已有账号？<router-link to="/login">立即登录</router-link></p>
  </div>
</template>

<script>
import AuthForm from '@/components/AuthForm.vue'

export default {
  components: {
    AuthForm
  },
  methods: {
    handleRegisterSuccess() {
      this.$router.push('/login')
    }
  },
  name: 'RegisterPage'
}
</script>